# import streamlit as st
# import pandas as pd
#
# st.header('这是一个测试平台')
# st.write('测试测试')
#
# df = pd.read_excel('static/data/pic/mllm_anno.xlsx')
# st.data_editor(df, use_container_width=True)


# import streamlit as st
# import pandas as pd
#
#
#
# # 示例数据
# data = {
#     'Name': ['Alice', 'Bob', 'Charlie', 'David'],
#     'Age': [30, 25, 35, 28],
#     'City': ['New York', 'Los Angeles', 'Chicago', 'Houston']
# }
#
# # 将数据转换为DataFrame
# df = pd.DataFrame(data)
#
# # 添加多选列
# selected_columns = st.multiselect('Select columns:', df.columns)
#
# # 显示筛选后的DataFrame
# st.dataframe(df[selected_columns])


import streamlit as st

# 设置 3 个按钮
button_1 = st.button("添加数据 A")
button_2 = st.button("添加数据 B")
button_3 = st.button("添加数据 C")

# 根据按钮点击情况往 session_state 中添加数据
if button_1:
    st.session_state["data"] = "A"
elif button_2:
    st.session_state["data"] = "B"
elif button_3:
    st.session_state["data"] = "C"

if 'data' in st.session_state:
    if st.session_state['data'] == "A":
        st.write('当前展示的是dataA')
    elif st.session_state['data'] == "B":
        st.write('当前展示的是dataB')
    elif st.session_state['data'] == "C":
        st.write('当前展示的是dataC')


